/* 歌词页面特定样式 */
.lyrics-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 20px; /* 添加顶部内边距，防止内容紧贴页面顶部 */
}

.content-container {
    padding-top: 15px; /* 给内容区域添加额外顶部间距 */
    max-width: 1000px; /* 限制最大宽度，改善大屏幕上的可读性 */
    margin: 0 auto;   /* 居中显示 */
}

.lyrics-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.album-cover {
    width: 160px;
    height: 160px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin-right: 24px;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-info {
    flex: 1;
}

.song-info h1 {
    font-size: 48px;
    margin: 0 0 8px;
    font-weight: 700;
}

.song-info h2 {
    font-size: 18px;
    color: #b3b3b3;
    margin: 0 0 16px;
    font-weight: 500;
}

.song-info .album-name {
    font-size: 14px;
    color: #b3b3b3;
}

.lyrics-main {
    flex: 1;
    background-color: rgba(18, 18, 18, 0.8);
    border-radius: 12px;
    padding: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.lyrics-container {
    max-height: calc(100vh - 380px);
    overflow-y: auto;
    padding-right: 15px;
    overflow-x: hidden;
    /* 防止水平滚动条出现 */
    width: 100%;
    /* 确保容器宽度正确 */
    scroll-behavior: smooth;
    /* 添加平滑滚动效果 */
}

.lyrics-container::-webkit-scrollbar {
    width: 8px;
}

.lyrics-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.lyrics-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.lyrics-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lyrics-container h2 {
    font-size: 24px;
    margin-bottom: 24px;
    color: #fff;
}

.lyrics {
    font-size: 24px;
    line-height: 1.8;
    text-align: center;
    padding: 20px 0;
    width: 100%;
    /* 确保内容不超出容器 */
    max-width: 100%;
    /* 限制最大宽度 */
    box-sizing: border-box;
    /* 确保padding不会导致宽度溢出 */
}

.lyric-line {
    margin-bottom: 16px;
    opacity: 0.7;
    color: #eaeaea;
    transition: all 0.4s ease;
    cursor: pointer;
    white-space: normal;
    /* 允许文本换行 */
    word-wrap: break-word;
    /* 确保长词可以换行 */
    word-break: break-word;
    /* 针对非英文语言更好的换行 */
}

.lyric-line:hover {
    opacity: 0.9;
}

.lyric-line.active {
    font-size: 28px;
    color: #1DB954;
    font-weight: 700;
    opacity: 1;
    transform: scale(1.05);
}

.scroll-hint-container {
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    color: #1DB954;
    opacity: 0.8;
}

/* 动态背景 */
.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #06194f, #132c4f, #101d33);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: -1;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 浮动音符动画 */
.floating-notes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.music-note {
    position: absolute;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.1);
    animation: float 15s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.1;
    }

    90% {
        opacity: 0.1;
    }

    100% {
        transform: translateY(-20vh) rotate(360deg);
        opacity: 0;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .lyrics-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .album-cover {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .song-info h1 {
        font-size: 32px;
    }

    .lyrics {
        font-size: 18px;
    }

    .lyric-line.active {
        font-size: 22px;
    }

    .lyrics-page {
        padding-top: 10px; /* 移动设备上减少顶部内边距 */
    }
}

/* 添加适配顶部导航栏的样式 */
.top-bar {
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(18, 18, 18, 0.3);
    transition: background-color 0.3s ease;
    z-index: 100;
    position: sticky;
    top: 0;
}

.top-bar.scrolled {
    background-color: rgba(18, 18, 18, 0.95);
}